﻿using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XNA_TD.Shells
{
    public class ExplosionParticle : SquarePointSprite, IFixedGameUpdate
    {
        Vector3 vel;
        public ExplosionParticle(Vector3 pos, Vector3 vel)
            : base(pos, .3f, new Vector4(1, 0.1f, 0, .5f), "Linear")
        {
            this.vel = vel;
            Register(this);
        }
  
        public void FixedGameUpdate()
        {
            vel.Y -= .001f;
            position += vel;
        }

        public void GameUpdate()
        {
            if (position.Y <= 0)
                UnRegister(this);
        }
    }
}
